package jvm;


/**
 * @author Europa
 * @create 2020-05-11 0:23
 */
public class ReentrantLockDemo {

    public static void main(String[] args) {


        RunDemo run = new RunDemo();
        for (int i = 0; i < 20; i++) {
            Thread thread = new Thread(run, String.valueOf(i));
            thread.start();
        }
        while (Thread.activeCount() > 2) {
            Thread.yield();
        }
        System.out.println(Thread.currentThread().getName() + "\t" + run.i);
        System.out.println(Thread.currentThread().getName() + "\t" + run.j);
        System.out.println(Thread.currentThread().getName() + "\t" + run.atomicInteger);


    }


}
